baubs git
src/utils/cssVariables.ts fix/security-headers-and-csp (1084633b) Text, 550 B
/**
* Get CSS variable value from document root
*/
export function getCSSVariable(name: string): string {
return getComputedStyle(document.documentElement)
.getPropertyValue(name)
.trim();
}
/**
* Canvas color helpers
*/
export const canvasColors = {
grid: () => getCSSVariable("--color-canvas-grid"),
origin: () => getCSSVariable("--color-canvas-origin"),
hoop: () => getCSSVariable("--color-canvas-hoop"),
bounds: () => getCSSVariable("--color-canvas-bounds"),
position: () => getCSSVariable("--color-canvas-position"),
};
Served by rngit 1.3.3 - Generated in 0.03s